package model.data;

import lombok.Data;

/**
 * @author 刀氏春秋
 * @date 2023/5/19
 */
@Data
public class Expression {
    private Double y;
    private Double xI;
    private Double xV;
    private Double xi;

    /**
     * 表达式构造方法
     *
     * @param y  单相表电流
     * @param xI 总表电流
     * @param xV 总表电压
     * @param xi 总表
     */
    public Expression(Double y, Double xV, Double xI, Double xi) {
        this.y = y;
        this.xI = xI;
        this.xV = xV;
        this.xi = xi;
    }

    public Double getY() {
        return y;
    }

    public Double getXI() {
        return xI;
    }

    public Double getXV() {
        return xV;
    }

    public Double getXi() {
        return xi;
    }

    @Override
    public String toString() {
        return String.format("(u:%f, xI:%f, xV:%f, xi:%f)", y, xI, xV, xi);
    }
}
